<?php

namespace lib;

class register{

     public static $register=[];

     public   function set($key,$value)
     {
         if(!$this->has($key))
         {
             self::$register[$key] = $value;
         }
     }

     public function has($key)
     {
         if(!self::$register)
         {
             return false;
         }
         return  in_array($key,self::$register);
     }

     public function get($key)
     {
         return  self::$register[$key];
     }

     public static function getInstance($key)
     {
         return  self::$register[$key];
     }


}